Most operating systems have a procedure for saving the contents of the physical memory to non-volatile storage at the time of a crash to make it easier for engineers to later identify the cause of the crash. This procedure is normally carried out by a subsystem in the kernel. When the kernel crashes, for example as a result of a fatal error in one of the programs it is running, the crash dump routine reads the content of the physical memory and writes it to a stable storage like a dedicated internal disk or over a network to an external device. Engineers can later run kernel debuggers on the stored data, the dump.
Memory is required to run the crash dump. Conventionally, an area of the memory is allocated at boot-up of the system for this purpose. However, when the entire memory for running the crash is allocated at boot-up, the allocated memory cannot be used for other purposes during run-time. This results in an inefficient use of the memory resources available. The problem is made even worse in operating systems using more advanced crash dump routines which make use of compression, parallel input/output and dump via network because they have higher memory requirements and, therefore, even more memory is unavailable for other purposes during run-time. Additionally, the amount of memory required to perform the crash dump is, in some circumstances, easier to identify at the time of the crash than at boot-up.
There have been attempts to overcome the above problems. For example, the HP-UX™ operating system allocates the memory for performing the dump at the time of the crash and not at run-time. The technique used by this operating system to find memory to use at the time of crash involves keeping track of what type of data each page in memory stores. The kernel classifies each page in physical memory according to its usage and at crash time it can easily identify those pages that belong to a class of pages which is safe to reuse. A problem with this technique is that the records for keeping track of the class to which each page belongs take up a large portion of the available memory.